<!DOCTYPE html>
<html>
	<head>
		<title>制证</title>
		<meta http-equiv="Pragma" CONTENT="no-cache">
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
		<meta name="renderer" content="webkit">
		<%include("/common/include.html"){}%>
		<script src="http://echarts.baidu.com/build/dist/echarts.js"></script>	
		<style>
			body{
				width: 500px;
				height:430px;
				margin: 0 auto;
				font-family: 仿宋;
				color:#000;
			}
			table td{
				border-bottom: 1px dashed #333;
				padding-left: 10px;
				height: 30px;
			}
			.font_style{
				font-size:16px;
				font-style:italic
			}
		</style>
	</head>
	<body >
	<!--startprint-->
		<div style="width: 500px; text-align: center;margin-top: 10px;font-size: 18px;font-family: 黑体">山西省大同市电动车行驶证</div>
		<table width="500">
		   <tr align="left">
	          <td width="15%">号牌号码</td>
	          <td colspan="2" class="font_style">${credentials.HPHM !}</td>
		   	  <td>档案编号</td>
	          <td colspan="2" class="font_style">${credentials.DABH !}</td>
	        </tr>
	        <tr align="left">
	          <td>所有人</td>
	          <td colspan="2" class="font_style">${credentials.OWNERNAME!}</td>
	       	  <td>车辆类型</td>
	          <td colspan="2" class="font_style">${credentials.CLLX!}</td>
	        </tr>
	        <tr align="left">
	          <td>住址</td>
	          <td colspan="5" class="font_style">${credentials.ADDRESS!} ${credentials.DETAILADDRESS!}</td>
	        </tr>
	        <tr align="left">
	          <td>使用性质</td>
	          <td colspan="2" class="font_style">${credentials.SYXZ!}</td>
	          <td>品牌型号</td>
	          <td colspan="2" class="font_style">${credentials.CLPP!} ${credentials.CLXH!}</td>
	        </tr>
	        <tr align="left">
	       	  <td rowspan="3" colspan="2" style="width:22%;border:2px solid red; color:red;font-size:18px;font-weight: bold;line-height: 35px;padding-left: 5px;">山西省大同市公安局交通警察支队</td>
	          <td>核定载人数</td>
	          <td class="font_style">${credentials.HDZRS!}人</td>
	          <td>整车质量</td>
	          <td class="font_style">${credentials.ZCZL!}kg</td>
	        </tr>
	        <tr align="left">
	          <td>登记日期</td>
	          <td class="font_style">${credentials.CREATEDATE}</td>
	          <td>发证日期</td>
	          <td class="font_style">${credentials.FZDATE}</td>
	        </tr>
	        <tr align="left">
	          <td>检查记录</td>
	          <td colspan="3" class="font_style">检验有效期至2020年01月</td>
	        </tr>
		</table>
		<!--endprint-->
		<br/><br/><br/>
		<a href="#" class="easyui-linkbutton" data-options="iconCls:'icon-ok'" style="margin-left: 45%;margin-bottom:3px;" onclick="doPrint()">打印</a>
		<br/>
</html>

<script type="text/javascript">

	var bdhtml = '';
	function doPrint() {
		bdhtml = window.document.body.innerHTML;
		var sprnstr = "<!--startprint-->";
		var eprnstr = "<!--endprint-->";
		var prnhtml = bdhtml.substring(bdhtml.indexOf(sprnstr) + 17, bdhtml.indexOf(eprnstr));
		window.document.body.innerHTML = prnhtml;
		/*如果是IE浏览器，则去除页眉页脚及底部链接  */
		if(getExplorer() == "IE"){
            pagesetup_null();
        }
		window.print();
		window.location.reload();
		//有问题
		/* if(tata = document.execCommand("canle")) {
			window.document.body.innerHTML = bdhtml;
		} else {
			window.document.body.innerHTML = bdhtml;
		} */
	}

	/*去除页眉页脚及底部链接  */
	function pagesetup_null(){                
		    var hkey_root,hkey_path,hkey_key;
		    hkey_root="HKEY_CURRENT_USER";
		    hkey_path="\\Software\\Microsoft\\Internet Explorer\\PageSetup\\";
		    try{
		        var RegWsh = new ActiveXObject("WScript.Shell");
		        hkey_key="header";
		        RegWsh.RegWrite(hkey_root+hkey_path+hkey_key,"");
		        hkey_key="footer";
		        RegWsh.RegWrite(hkey_root+hkey_path+hkey_key,"");
		    }catch(e){}
		}
	/*判断浏览器  */
	function getExplorer() {
	    var explorer = window.navigator.userAgent ;
	    //ie 
	    if (explorer.indexOf("MSIE") >= 0) {
	        return "IE";
	    }
	    //firefox 
	    else if (explorer.indexOf("Firefox") >= 0) {
	        return "Firefox";
	    }
	    //Chrome
	    else if(explorer.indexOf("Chrome") >= 0){
	        return "Chrome";
	    }
	    //Opera
	    else if(explorer.indexOf("Opera") >= 0){
	        return "Opera";
	    }
	    //Safari
	    else if(explorer.indexOf("Safari") >= 0){
	        return "Safari";
	    }
	}
		
</script>
